<template>
	<view class="notice-details">
		<view class="top-section">
			<view class="title">{{ resObj.noticeTitle }}</view>
			<view class="sub">
				<view class="left">
					<view class="col">通知公告</view>
					<view class="vertical-divider-line">{{ resObj.createTime || '-' }}</view>
				</view>
			</view>
		</view>
		<view class="mian-content">
			<view class="content-box">
				<u-parse :html="resObj.noticeContent" :tag-style="parseStyle"></u-parse>
			</view>
			<u-loadmore status="nomore"/>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				searchObj: {
					isRead: 0,
					pageNum: 1,
					pageSize: 10,
				},
				resObj: {},
				parseStyle:{
					'p': 'line-height: 48rpx;',
					'img': 'width:100%',
				},
				
			}
		},
		onLoad(options) {
			this.getInfo(options.id)
		},
		methods: {
			getInfo(noticId){
				uni.showLoading({
					mask: true
				})
				this.$request({
					url: '/loginUserInfo/'+noticId,
					method: 'get',
					data: {}
				}).then(res => {
					uni.hideLoading()
					this.resObj = res.data
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	page {
		background: #FFFFFF;
	}
	.top-section {
		padding: 0 24rpx;
		.title {
			margin-top: 32rpx;
			font-size: 32rpx;
			font-weight: bold;
			color: #1F1F1F;
			line-height: 48rpx;
		}
		
		.sub {
			padding-top: 24rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			font-size: 24rpx;
			color: #999999;
			line-height: 24rpx;
			
			.left {
				display: flex;
				
				.col {
					color: #3392FF;
				}
			}
		}
	}
	
	.mian-content {
		padding: 48rpx 24rpx;
		.content-box{
			border-top: 1px solid #eee;
			padding-top: 32rpx;
			font-size: 28rpx;
		}
	}
</style>